<template>
    <div class="container">
        我是parent，我的name是{{ data.name }}
        <Child @changeData="changeData" @getData="getData" :data="data" :obj="obj" />
    </div>
</template>

<script setup>
import { reactive, ref } from 'vue';
import Child from './Child.vue';
const data = reactive({
    name: 'Parent',
    data: '我是父组件的数据'
})
const obj = ref({
    name: 'jiangqi',
    age: 18
})
const changeData = (data) => {
    console.log('触发data', data)
}
const getData = (data) => {
    console.log('getData', data);
}
</script>

<style lang="scss" scoped>
</style>